//
//  XGL_PersonalInforNumberItem.swift
//  XGamesLive
//
//  Created by ios on 2024/5/20.
//

import UIKit

class XGL_PersonalInforNumberItem: UIView {
    
    private var titleText: UILabel!
    private var subtitleText: UILabel!
    
    var itemButton: UIButton!
    
    var subtitle: String = ""{
        didSet{
            self.subtitleText.text = self.subtitle
        }
    }
    var title: String = ""{
        didSet{
            self.titleText.text = self.title
        }
    }

    override init(frame: CGRect) {
        super.init(frame: frame)
        self.titleText = UILabel().then({ make in
            make.textColor = UIColor.hexColor("#80FFE6")
            make.font = UIFont.pingfangSC_Semibold(fontSize: 20.0)
        })
        self.subtitleText = UILabel().then({ make in
            make.textColor = UIColor.hexColor("#DBDBDB")
            make.font = UIFont.pingfangSC_Regular(fontSize: 14.0)
        })
        self.itemButton = UIButton()
        self.addSubviews([self.titleText,self.subtitleText,self.itemButton])
        self.titleText.snp.makeConstraints { make in
            make.centerY.height.left.equalToSuperview()
        }
        self.subtitleText.snp.makeConstraints { make in
            make.centerY.height.equalToSuperview()
            make.left.equalTo(self.titleText.snp.right).offset(6.0)
        }
        itemButton.snp.makeConstraints { make in
            make.edges.equalToSuperview()
        }
        self.snp.makeConstraints { make in
            make.height.equalTo(22.0)
            make.right.equalTo(self.subtitleText.snp.right)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
